<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>鼠标滚轮事件</title>
    <style>
        #box1 {
            width: 100px;
            height: 100px;
            background-color: #bfa;

        }
    </style>

    <script>
        window.onload = function () {

            var box1 = document.getElementById("box1");

            box1.onmousewheel = function (event) {
                //判断方向
                if (event.wheelDelta > 0) {
                    box1.style.height = box1.clientHeight - 10 + "px";
                } else {
                    box1.style.height = box1.clientHeight + 10 + "px";
                }
            }
            box1.on


        }

    </script>
</head>

<body>
    <div id="box1"></div>
</body>

</html>